\(\int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx\) [386]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 30, antiderivative size = 46 \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\frac {\text {arctanh}(\sin (e+f x)) \cos (e+f x)}{f \sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]

[Out]

arctanh(sin(f*x+e))*cos(f*x+e)/f/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2820, 3855} \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\frac {\cos (e+f x) \text {arctanh}(\sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \]

[In]

Int[1/(Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]),x]

[Out]

(ArcTanh[Sin[e + f*x]]*Cos[e + f*x])/(f*Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]])

Rule 2820

Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Di
st[Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), Int[1/Cos[e + f*x], x], x] /; FreeQ[{a, b
, c, d, e, f}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\cos (e+f x) \int \sec (e+f x) \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = \frac {\text {arctanh}(\sin (e+f x)) \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(112\) vs. \(2(46)=92\).

Time = 0.39 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.43 \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=-\frac {\left (\log \left (1-\tan \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{\sqrt {3} f \sqrt {1+\sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]

[In]

Integrate[1/(Sqrt[3 + 3*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]),x]

[Out]

-(((Log[1 - Tan[(e + f*x)/2]] - Log[1 + Tan[(e + f*x)/2]])*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])*(Cos[(e + f*x
)/2] + Sin[(e + f*x)/2]))/(Sqrt[3]*f*Sqrt[1 + Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]]))

Maple [A] (verified)

Time = 4.79 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.61

method result size
default \(-\frac {\cos \left (f x +e \right ) \left (\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )-\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )\right )}{f \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}\, \sqrt {a \left (\sin \left (f x +e \right )+1\right )}}\) \(74\)

[In]

int(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/f*cos(f*x+e)*(ln(-cot(f*x+e)+csc(f*x+e)-1)-ln(-cot(f*x+e)+csc(f*x+e)+1))/(-c*(sin(f*x+e)-1))^(1/2)/(a*(sin(
f*x+e)+1))^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.48 \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\left [\frac {\sqrt {a c} \log \left (-\frac {a c \cos \left (f x + e\right )^{3} - 2 \, a c \cos \left (f x + e\right ) - 2 \, \sqrt {a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{3}}\right )}{2 \, a c f}, -\frac {\sqrt {-a c} \arctan \left (\frac {\sqrt {-a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}}{a c \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right )}{a c f}\right ] \]

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(a*c)*log(-(a*c*cos(f*x + e)^3 - 2*a*c*cos(f*x + e) - 2*sqrt(a*c)*sqrt(a*sin(f*x + e) + a)*sqrt(-c*si
n(f*x + e) + c)*sin(f*x + e))/cos(f*x + e)^3)/(a*c*f), -sqrt(-a*c)*arctan(sqrt(-a*c)*sqrt(a*sin(f*x + e) + a)*
sqrt(-c*sin(f*x + e) + c)/(a*c*cos(f*x + e)*sin(f*x + e)))/(a*c*f)]

Sympy [F]

\[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {1}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )}}\, dx \]

[In]

integrate(1/(a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e))**(1/2),x)

[Out]

Integral(1/(sqrt(a*(sin(e + f*x) + 1))*sqrt(-c*(sin(e + f*x) - 1))), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {1}{\sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}} \,d x } \]

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)), x)

Giac [F(-2)]

Exception generated. \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(1/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:index.cc index_m i_lex_is_greater Error: Bad Argument Value

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {3+3 \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {1}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \]

[In]

int(1/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(1/2)),x)

[Out]

int(1/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(1/2)), x)